import request from '@/utils/request'

export function planList(data) {
  return request({
    url: '/purchase/plan',
    method: 'get',
    params: data
  })
}
export function planCreate(data) {
  return request({
    url: '/purchase/plan/create',
    method: 'post',
    data
  })
}
export function planDetail(id) {
  return request({
    url: '/purchase/plan/' + id,
    method: 'get'
  })
}
export function planDelete(id) {
  return request({
    url: '/purchase/plan/' + id,
    method: 'delete'
  })
}
export function createPlanChange(data) {
  return request({
    url: '/purchase/plan/createPlanChange',
    method: 'post',
    data
  })
}
export function deletePlanChange(id) {
  return request({
    url: '/purchase/plan/change/' + id,
    method: 'delete'
  })
}
// 采购信息
export function informationList(data) {
  return request({
    url: '/purchase/information',
    method: 'get',
    params: data
  })
}
export function informationCreate(data) {
  return request({
    url: '/purchase/information/create',
    method: 'post',
    data
  })
}
export function informationDetail(id) {
  return request({
    url: '/purchase/information/' + id,
    method: 'get'
  })
}
export function informationDelete(id) {
  return request({
    url: '/purchase/information/' + id,
    method: 'delete'
  })
}
export function deleteAcceptance(id) {
  return request({
    url: '/purchase/information/deleteAcceptance/' + id,
    method: 'delete'
  })
}
export function deleteMaterial(id) {
  return request({
    url: '/purchase/information/deleteMaterial/' + id,
    method: 'delete'
  })
}
export function createAcceptance(data) {
  return request({
    url: '/purchase/information/createAcceptance',
    method: 'post',
    data
  })
}
export function createMaterial(data) {
  return request({
    url: '/purchase/information/createMaterial',
    method: 'post',
    data
  })
}
// 仓库管理
export function warehouseList(data) {
  return request({
    url: '/purchase/warehouse',
    method: 'get',
    params: data
  })
}
